// ****************************************************************************
//
// Logic 9: Plateau's Peak
//
// ****************************************************************************

#include "defines.txt"

if (new_room) {
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(37);

if (!has("cauldron") &&
    !cauldron_on_stove){
  animate.obj(o2);
  load.view(54);
  set.view(o2,54);
  position(o2,69,112);
  draw(o2);
  }

if (prev_room_no == 8) {
   position(ego,12,140);
 }

  draw(ego);
  show.pic();
}

distance(ego,o2,range);

if (said("look")) {
  print("The top of the plateau looks out on the canopy below, the stream which comes out of the mouth of a cave.");
  print("You can also see the waterfall which is rumored to hide a secret cave.  At the edge of the gulf is the main village.");
}

if (said("take","cauldron")) {
    if (range<=20) {
        if (!has("cauldron") &&
            !cauldron_on_stove){
            erase(o2);
            get("cauldron");
            print("You recover your cauldron and place it somewhere in your enormous pants.");
            }
        else {
            print("You can't take it if you already have it, now can you?");
            }
    }
    else {
        print("Your arms aren't long enough.");
        }
    }

if (ego_edge_code == bottom_edge) {   // ego touching bottom edge of screen
  new.room(8);
}

return();